package com.xhtt.modules.task.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author feipc
 * @since 2019-06-13
 */
@Data
public class TaskOperSeo {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;
    @TableField(exist = false)
    private String date;

    private String planName;

    private String taskName;

    private String line;

    private Integer teamId;

    private String teamName;

    private Integer userId;

    private String userName;

    private Integer status;
    @TableField(exist = false)
    private String statusName; //状态 中文

    private LocalDateTime planStartDate;

    private LocalDateTime planEndDate;

    private LocalDateTime startTime;
    @TableField(exist = false)
    private int startTimeIfWarn; //1报警色 0 没有

    private LocalDateTime finishTime;
    @TableField(exist = false)
    private int finishTimeIfWarn;//1报警色 0 没有

    @TableField(exist = false)
    private Integer planType;
    @TableField(exist = false)
    private Integer taskType;

    public String getStatusName() {
        if (null != status && status.intValue() == 10) {
            return "已完成";
        } else {
            return "未完成";
        }
    }
}
